package com.douyu.ocean.monitor;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;

public class JavaShellAPI {

	public static void main(String[] args) throws IOException {
		List<String> strList = new ArrayList<String>();
		String shStr = "check.sh";
		Process process;
		process = Runtime.getRuntime().exec(new String[]{"/bin/sh",shStr,"182.18.47.242"});
		InputStreamReader ir = new InputStreamReader(process.getInputStream());
		BufferedReader input = new BufferedReader(ir);
		String line = "";
		while((line = input.readLine())!= null){
			strList.add(line);
		}
		input.close();
		
		
		for(String li : strList){
			System.out.println(li);
		}
	}
}
